<?php exit;?>
{if $zbp->Config('San_Rabbit')->s_slide=="1"}
<div class="s_slide">
	<div class="banner">
		<div class="swiper-container">
			<div class="swiper-wrapper">
				{php}
					if(json_decode($homeSliderArray,true)){
						$homeSliderArray = json_decode($homeSliderArray,true);
				{/php}
				{foreach $homeSliderArray as $slider}
					<div class="swiper-slide">
						<a href="{$slider['url']}" target="_blank"><img src="{$slider['img']}" alt="{$slider['title']}"><section><h4>{$slider['title']}</h4></section></a>
					</div>
				{/foreach}
				{php}
					}
				{/php}
			</div>
			<div class="swiper-pagination"></div>
			<div class="swiper-button-next"></div>
			<div class="swiper-button-prev"></div>
		</div>
		<script>
			 var swiper = new Swiper('.swiper-container', {
					pagination: '.swiper-pagination',
					nextButton: '.swiper-button-next',
					prevButton: '.swiper-button-prev',
					paginationClickable: true,
					spaceBetween: 100,
					centeredSlides: true,
					autoplay: 8000,
					autoplayDisableOnInteraction: false,
				});
		</script> 
	</div>
	<div class="headline">
		<ul>    
			{php}$array = explode(',',$zbp->Config('San_Rabbit')->coid);{/php}
			{foreach $array as $id}
				{$post=GetPost((int)$id);}
				<li>
					<a href="{$post.Url}" title="{$post.Title}">
						{if isset(Thumb::Thumbs([$post->Metas->listimg], 230, 140, 1, true)[0])}
							{php}$src=Thumb::Thumbs([$post->Metas->listimg], 230, 140, 1, true)[0];{/php}
							<img src="{$src}" alt="{$post.Title}" />
						{elseif isset($post.Thumbs(230,140,1)[0])}
							<img src="{$post.Thumbs(230,140,1)[0]}" alt="{$post.Title}" />
						{else}
							{php}
								$randimg=rand(1,5);
								$src = $host.'zb_users/theme/San_Rabbit/style/img/'.$randimg.'.jpg';
								$src = Thumb::Thumbs([$src], 230, 140, 1, true)[0];
							{/php}
							<img src="{$src}" alt="{$post.Title}" />	
						{/if}
					<span>
						<h4>{$post.Title}</h4>
					</span>
					</a>
				</li>    
			{/foreach}		
		</ul>
    </div>
</div>
{/if}